<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>slot</title>
  <script src="/vue.js"></script>
</head>
<body>
  <div id="root">
    <child @click="msg='bbb'">
      <template #[sname]="{title}">
        <div>
          {{title}}
        </div>
      </template>
    </child>
  </div>
  <script>
    Vue.component('child-hood', {
      data() {
        return {
          title: 'aa',
        }
      },
      template: `<div>child-hood</div>`
    })
    Vue.component('child', {
      data() {
        return {
          title: 'hello'
        }
      },
      mounted() {
        this.$emit('')
      },
      template: `
        <div style="font-size: 50px;">
          <child-hood></child-hood>
          <slot :title="'aaa'" :name-a="'bbb'"></slot>
          <slot name="s1" :title="'aaa'" :name-a="'ccc'"></slot>
        </div>
      `
    })

    var vm = new Vue({
      el: '#root',
      data: {
        msg: 'world',
        sname: 's1'
      }
    })
  </script>
</body>
</html>